import { IProjectAnswerParams, IUpdateItem, IWenda } from '@/utils/students/projectAnswer';
import { request } from 'umi';

//  /sypt/answer/list?isAsc=desc&pageNum=1&pageSize=10&type=&questionTitle=&quality=&authentication=
export let getProjectAnswerList = (params: IProjectAnswerParams) => {
    return request("/sypt/answer/list", { params })
}


// 我的问答 /sypt/answer/reply
export let getMyReply = () => {
    return request("/sypt/answer/reply")
}

//问答管理  我的问题
// /sypt/answer/myAsk?pageNum=4&pageSize=10&questionTitle=  33
export let getProjectAnswermyAskList1 = (params: IWenda) => {
    return request("/sypt/answer/myAsk", { params })
}

//问答管理  我的答案
// /sypt/answer/myAnswer?pageNum=2&pageSize=10&questionTitle= 32
export let getProjectAnswermyAnswerList2 = (params: IWenda) => {
    return request("/sypt/answer/myAnswer", { params })
}
//问答管理  修改编辑  

export let UpdateMyReply = (params: IUpdateItem) => {
    return request("/sypt/answer/update", {
        method: 'POST',
        params
    })
}

//删除  /sypt/answer/delete?answerId=8093039253970550784
export let deleteAnswer = (id: any) => {
    return request('/sypt/answer/delete?answerId=', {
        method: 'DELETE',
        id
    })
}